home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 65.zip / BS1 part 65 / Prowrite v3.2.4.adf / PostScript Prep < prev    next >
Text File  |  1992-05-07  |  5KB  |  268 lines

  1. /penGray 0 def
  2. /penRed 0 def
  3. /penGreen 0 def
  4. /penBlue 0 def
  5. /colorPen? false def
  6. /EncodingChanges [
  7. 152 /dotlessi
  8. 153 /grave
  9. 154 /acute
  10. 155 /circumflex
  11. 156 /tilde
  12. 157 /dieresis
  13. 158 /ring
  14. 159 /cedilla
  15. 160 /space
  16. 164 /currency
  17. 166 /bar
  18. 168 /dieresis
  19. 169 /copyright
  20. 170 /ordfeminine
  21. 172 /logicalnot
  22. 173 /hyphen
  23. 174 /registered
  24. 175 /macron
  25. 176 /ring
  26. 177 /.notdef
  27. 178 /quotedblright
  28. 179 /dagger
  29. 180 /quotesingle
  30. 185 /quotedblleft
  31. 186 /ordmasculine
  32. 188 /daggerdbl
  33. 189 /.notdef
  34. 192 /Agrave
  35. 193 /Aacute
  36. 194 /Acircumflex
  37. 195 /Atilde
  38. 196 /Adieresis
  39. 197 /Aring
  40. 198 /AE
  41. 199 /Ccedilla
  42. 200 /Egrave
  43. 201 /Eacute
  44. 202 /Ecircumflex
  45. 203 /Edieresis
  46. 204 /Igrave
  47. 205 /Iacute
  48. 206 /Icircumflex
  49. 207 /Idieresis
  50. 208 /.notdef
  51. 209 /Ntilde
  52. 210 /Ograve
  53. 211 /Oacute
  54. 212 /Ocircumflex
  55. 213 /Otilde
  56. 214 /Odieresis
  57. 215 /endash
  58. 216 /Oslash
  59. 217 /Ugrave
  60. 218 /Uacute
  61. 219 /Ucircumflex
  62. 220 /Udieresis
  63. 223 /germandbls
  64. 224 /agrave
  65. 225 /aacute
  66. 226 /acircumflex
  67. 227 /atilde
  68. 228 /adieresis
  69. 229 /aring
  70. 230 /ae
  71. 231 /ccedilla
  72. 232 /egrave
  73. 233 /eacute
  74. 234 /ecircumflex
  75. 235 /edieresis
  76. 236 /igrave
  77. 237 /iacute
  78. 238 /icircumflex
  79. 239 /idieresis
  80. 241 /ntilde
  81. 242 /ograve
  82. 243 /oacute
  83. 244 /ocircumflex
  84. 245 /otilde
  85. 246 /odieresis
  86. 247 /emdash
  87. 248 /oslash
  88. 249 /ugrave
  89. 250 /uacute
  90. 251 /ucircumflex
  91. 252 /udieresis
  92. 255 /ydieresis
  93. ] def
  94. /AmigaEncoding StandardEncoding length array def
  95. AmigaEncoding 0 StandardEncoding putinterval
  96. EncodingChanges aload length 2 idiv {AmigaEncoding 3 1 roll put} repeat
  97. /bdef {bind def} bind def
  98. /xdef {exch def} bdef
  99. systemdict /rectfill known {
  100. /systemdict /rectfill get /RF xdef
  101. }{
  102. /RF {
  103. newpath
  104. 4 -2 roll moveto
  105. dup 0 exch rlineto
  106. exch 0 rlineto
  107. neg 0 exch rlineto
  108. closepath fill
  109. } bdef
  110. } ifelse
  111. /SetColor {
  112. dup /colorPen? xdef {
  113. 15 div /penBlue xdef
  114. 15 div /penGreen xdef
  115. 15 div /penRed xdef
  116. }{
  117. 127 div /penGray xdef
  118. } ifelse
  119. } bdef
  120. /BuildFont {
  121. dup maxlength dict /NewFontDict xdef
  122. {
  123. exch dup /FID eq {pop pop} {exch NewFontDict 3 1 roll put} ifelse
  124. } forall
  125. dup NewFontDict /FontName 3 -1 roll put
  126. NewFontDict /Encoding AmigaEncoding put
  127. NewFontDict definefont
  128. } bdef
  129. /SetFont {
  130. {
  131. dup length 2 add string
  132. dup 0 (__) putinterval
  133. dup 2 3 index putinterval
  134. cvn dup FontDirectory exch known {
  135. exch pop findfont
  136. }{
  137. exch cvn findfont BuildFont
  138. } ifelse
  139. }{
  140. cvn findfont
  141. } ifelse
  142. exch scalefont setfont
  143. } bdef
  144. /DoUnderline {
  145. gsave
  146. currentfont dup /FontMatrix get exch /FontInfo get
  147. 2 copy
  148. /UnderlineThickness get 0 exch 3 -1 roll dtransform setlinewidth pop
  149. /UnderlinePosition get 0 exch 3 -1 roll dtransform dup 3 1 roll
  150. rmoveto add lineto stroke
  151. grestore
  152. } bdef
  153. /Text {
  154. gsave
  155. /text xdef
  156. /underline? xdef
  157. 4 2 roll moveto
  158. rotate
  159. colorPen? {
  160. penRed penGreen penBlue setrgbcolor
  161. }{
  162. penGray setgray
  163. } ifelse
  164. underline? {currentpoint 3 -1 roll} if
  165. abs text stringwidth pop sub text length div 0 text ashow
  166. underline? {DoUnderline} if
  167. grestore
  168. } bdef
  169. /BMap {
  170. gsave
  171. /color? xdef
  172. /height xdef
  173. /width xdef
  174. /y2 xdef
  175. /x2 xdef
  176. /y1 xdef
  177. /x1 xdef
  178. x2 x1 sub abs 1 add width div /cellWidth xdef
  179. y2 y1 sub abs 1 add height div neg /cellHeight xdef
  180. x1 cellWidth 2 div sub /x1 xdef
  181. y1 cellHeight 2 div sub /y1 xdef
  182. width color? {2 mul} if string /dataStr xdef
  183. color? {
  184. /y0 y1 def
  185. 0 1 height 1 sub {
  186. pop
  187. currentfile dataStr readhexstring pop pop
  188. /x0 x1 def
  189. 0 1 width 1 sub {
  190. 1 bitshift dup
  191. dataStr exch get
  192. dup 16#F0 and 0 eq {
  193. 16#0F and 15 div
  194. dataStr 3 -1 roll 1 add get
  195. dup 16#F0 and -4 bitshift 15 div
  196. exch 16#0F and 15 div
  197. setrgbcolor
  198. x0 y0 cellWidth cellHeight RF
  199. }{
  200. pop pop
  201. } ifelse
  202. x0 cellWidth add /x0 xdef
  203. } for
  204. y0 cellHeight add /y0 xdef
  205. } for
  206. }{
  207. /y0 y1 def
  208. 0 1 height 1 sub {
  209. pop
  210. /x0 x1 def
  211. currentfile dataStr readhexstring pop
  212. {
  213. dup 16#80 and 0 eq {
  214. 16#7F and 127 div
  215. setgray
  216. x0 y0 cellWidth cellHeight RF
  217. }{
  218. pop
  219. } ifelse
  220. x0 cellWidth add /x0 xdef
  221. } forall
  222. y0 cellHeight add /y0 xdef
  223. } for
  224. } ifelse
  225. grestore
  226. } bdef
  227. /BPlane {
  228. gsave
  229. /height xdef
  230. /width xdef
  231. /y2 xdef
  232. /x2 xdef
  233. /y1 xdef
  234. /x1 xdef
  235. colorPen? {
  236. penRed penGreen penBlue setrgbcolor
  237. }{
  238. penGray setgray
  239. } ifelse
  240. x1 y2 translate
  241. x2 x1 sub abs 1 add y2 y1 sub abs 1 add scale
  242. width 7 add 8 idiv string /dataStr xdef
  243. width height true
  244. matrix dup 0 width put dup 3 height neg put dup 5 height put
  245. {currentfile dataStr readhexstring pop}
  246. imagemask
  247. grestore
  248. } bdef
  249. /PaperSize {
  250. dup 1 eq {
  251. userdict /letter known {letter} if
  252. } if
  253. dup 2 eq {
  254. userdict /legal known {legal} if
  255. } if
  256. 3 eq {
  257. userdict /a4 known {a4} if
  258. } if
  259. } bdef
  260. /ManualFeed {
  261. statusdict /manualfeed known {
  262. statusdict /manualfeed 3 -1 roll put
  263. }{
  264. pop
  265. } ifelse
  266. } bdef
  267. statusdict /waittimeout known {statusdict /waittimeout 0 put} if
  268.